﻿'         This file is Copyright © 2008-2012 Billy O'Neal and Aommaster
'                            All rights reserved.
'
' This file is released under the 2-Clause BSD license, included in LICENSE.TXT
'                           and on the MHWT website
Friend Class EditIssue
    Friend WithEvents editedInstance As Issue
    Public Sub New(ByRef EditedIssue As Issue)
        InitializeComponent()
        editedInstance = EditedIssue
        populate()
    End Sub
    Private Sub populate() Handles editedInstance.Modified
        evidenceBox.Text = editedInstance.Evidence
        whatBox.Text = editedInstance.Description
    End Sub
    Private Sub terminate() Handles editedInstance.Deleted
        Me.Close()
    End Sub
    Private Sub evidenceBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles evidenceBox.TextChanged
        editedInstance.Evidence = evidenceBox.Text
    End Sub

    Private Sub whatBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles whatBox.TextChanged
        editedInstance.Description = whatBox.Text
    End Sub
End Class